Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TCOPFLOW Python Bindings First Pass #131

Merged
merged 36 commits into from
May 21, 2024
Merged

TCOPFLOW Python Bindings First Pass #131

merged 36 commits into from
May 21, 2024

Conversation

cameronrutherford
Copy link
Contributor

@cameronrutherford cameronrutherford commented Mar 26, 2024

Merge request type

  • New feature
  • Resolves bug
  • Documentation
  • Other

Relates to

  • OPFLOW
  • SOPFLOW
  • SCOPFLOW
  • TCOPFLOW
  • CMake build system
  • Spack configuration
  • Manual
  • Web docs
  • Other

This MR updates

  • Header files
  • Source code
  • CMake build system
  • Spack configuration
  • Web docs
  • Manual
  • Other - python bindings

Summary

Summarize the MR concisely

Linked Issue(s)

Link any relevant issues. If merging into the default branch, any directly addressed issues will be closed when merging into the default branch (develop).

Since GitHub is specific on language, make sure to include direct language if you want to have the issue closed:

  • Closes #issue
  • Resolves #issue

You can also reference issues, but this will not close the issue when the merge request is merged:

  • Partly related to #issue
  • #issue
  • Partially addresses #issue

@Jayapreethi Jayapreethi self-assigned this Apr 30, 2024
@Jayapreethi
Copy link
Collaborator

Hi @cameronrutherford, this is ready for review. Please let me know about any further required changes .

@jaelynlitz jaelynlitz mentioned this pull request Apr 30, 2024
15 tasks
Copy link
Contributor Author

@cameronrutherford cameronrutherford left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good! Requested some changes but this is almost ready to merge

interfaces/python/CMakeLists.txt Show resolved Hide resolved
interfaces/python/example_tcopflow.py Show resolved Hide resolved
tests/interfaces/python/test_5_tcopflow.py Outdated Show resolved Hide resolved
tests/interfaces/python/test_5_tcopflow.py Outdated Show resolved Hide resolved
tests/interfaces/python/test_5_tcopflow.py Show resolved Hide resolved
Copy link
Contributor Author

@cameronrutherford cameronrutherford left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please make sure as well to update the python interface markdown documentation @Jayapreethi

tcopf.solve()
tcopf.print_solution(0)

# Delete instance before finalization (try, at least)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wdym try, at least? Does this not work when running?

@@ -1,10 +1,12 @@
# test initializing exago only once
import exago
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
import exago

Don't import exago before check_preconditions

@@ -0,0 +1,38 @@
import exago
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move this import to after check_preconditions() is called.

Also, make sure to extend this fix to all of our other tests

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please make sure to move this import.........

Copy link
Contributor

@jaelynlitz jaelynlitz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - please add the functions that you've ported in a new table for TCOPFLOW in this doc page then I think this is good to go

@cameronrutherford cameronrutherford changed the title Jaya/pytest TCOPFLOW Python Bindings First Pass May 8, 2024
@Jayapreethi
Copy link
Collaborator

Documented the tested functions of TCOPFLOW.

Copy link
Contributor Author

@cameronrutherford cameronrutherford left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor cleanup

import mpi4py.rc
mpi4py.rc.threads = False
from mpi4py import MPI # noqa
check_preconditions()
import exago # noqa


Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Eliminate duplicate check_preconditions()

import exago # noqa


check_preconditions()
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
check_preconditions()

import mpi4py.rc
mpi4py.rc.threads = False
from mpi4py import MPI # noqa
check_preconditions()
import exago # noqa

check_preconditions()
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
check_preconditions()

import mpi4py.rc
mpi4py.rc.threads = False
from mpi4py import MPI # noqa
check_preconditions()
import exago # noqa

check_preconditions()
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
check_preconditions()

import exago # noqa


check_preconditions()
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
check_preconditions()

mpi4py.rc.threads = False
check_preconditions()

check_preconditions()
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
check_preconditions()

from check_preconditions import check_preconditions
check_preconditions()


check_preconditions()
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
check_preconditions()

@@ -0,0 +1,38 @@
import exago
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please make sure to move this import.........

Copy link
Contributor Author

@cameronrutherford cameronrutherford left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One final missed check_preconditions(), apart from that looks good to merge!

@@ -1,8 +1,7 @@
# test only run once things here
import pytest
import exago
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
import exago

from check_preconditions import check_preconditions

check_preconditions()
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
check_preconditions()
check_preconditions()
import exago

@cameronrutherford
Copy link
Contributor Author

Spack ubuntu pipelines are failing... See #144

@jaelynlitz or @abhyshr with one final review I think this is good to merge! Thanks @Jayapreethi

@cameronrutherford cameronrutherford enabled auto-merge (squash) May 21, 2024 17:18
@cameronrutherford cameronrutherford merged commit 84fdbf2 into develop May 21, 2024
7 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants